﻿#pragma include (lighting.inc)
in vec3 vertex_position;
in vec4 vertex_color;

out vec2 out_texcoord;
out vec3 out_normal;
out vec3 world_position;
out vec4 out_vertexcolor;
out vec4 view_position;

uniform mat4x4 World;
uniform mat4x4 View;
uniform mat4x4 ViewProjection;
uniform vec4 MaterialAnim;

void main()
{
    vec4 pos = (ViewProjection * World) * vec4(vertex_position, 1.0);
    gl_Position = pos;
    world_position = (World * vec4(vertex_position,1)).xyz;
    view_position = (View * World) * vec4(vertex_position, 1);
    out_normal = vec3(1,1,1);
    out_texcoord = vec2(0,0);
    out_vertexcolor = vertex_color;
    light_vert(world_position, view_position, out_normal);
}
